<!--
 * @Description: 首页组件
 * @Author: hai-27
 * @Date: 2020-02-07 16:23:00
 * @LastEditors: hai-27
 * @LastEditTime: 2020-02-27 13:36:12
 -->
<template>
  <div class="home" id="home" name="home">
    <!-- 轮播图 -->
    <div class="block">
      <el-carousel height="460px" >
        <el-carousel-item>
          <img style="height:460px; width: 100%;" src="../lbt/12.19三星品牌日.jpg"/>
        </el-carousel-item>
		<el-carousel-item>
		  <img style="height:460px; width: 100%" src="../lbt/q.jpg"/>
		</el-carousel-item>
		<el-carousel-item>
		  <img style="height:460px; width: 100%" src="../lbt/q (1).jpg"/>
		</el-carousel-item>
		<el-carousel-item>
		  <img style="height:460px; width: 100%" src="../lbt/q (2).jpg"/>
		</el-carousel-item>
		<el-carousel-item>
		  <img style="height:460px; width: 100%" src="../lbt/q (3).jpg"/>
		</el-carousel-item>
      </el-carousel>
	  
    </div>
    <!-- 轮播图END -->
	
    <div class="main-box">
      <div class="main">
        <!-- 商品展示区域 -->
        <div class="phone">
          <div class="box-hd">
            <div class="title" style="color: red;">热门推荐</div>
          </div>
          <div class="box-bd">
            <div class="promo-list">
              <router-link to>
                <img :src="$target +'public/imgs/phone/phone.png'" />
              </router-link>
            </div>
            <div class="list">
              <MyList :list="goodsList" :isMore="true"></MyList>
            </div>
          </div>
        </div>
        <!-- 商品展示区域END -->

      </div>
    </div>
  </div>
</template>
<script>
import {goodsShow} from '@/api/home.js'
export default {
  data() {
    return {
      goodsList: [], // 手机商品列表
      pages:{
      	total:0,
      	pageSize:100,
      	pageNum:1
      }
    };
  },
  methods: {
    initGoodsData(){
		var params={pageNum:this.pages.pageNum,pageSize:this.pages.pageSize}
		goodsShow(params).then(reslut=>{
			this.goodsList=reslut.data.data.mapList
		})
	}
  },
  beforeMount(){
  	this.initGoodsData()
  }
}
</script>
<style scoped>
@import "../assets/css/index.css";
</style>